<template>
    <view @tap="__e" :class="['item-container', 'data-v-cba160fe', theme + ' ' + grid]" :data-event-opts="[['tap', [['toDetail', ['$event']]]]]" hoverClass="hover">
        <view class="thumb-c data-v-cba160fe">
            <image :class="['p-tag', 'data-v-cba160fe', theme + ' ' + grid + ' location-' + info.image_tag.location]" :src="info.image_tag.image" v-if="info.image_tag"></image>
            <image class="thumb data-v-cba160fe" mode="aspectFill" :src="info.thumb + '?x-oss-process=image/resize,w_500'"></image>
            <view class="presell-c data-v-cba160fe" v-if="info.is_presell">预售</view>
            <view class="empty-stock data-v-cba160fe" v-if="info.stock === 0">
                <image class="data-v-cba160fe" mode="widthFix" src="/static/empty-stock.png"></image>
            </view>
        </view>
        <view class="body data-v-cba160fe">
            <view class="title data-v-cba160fe">{{ info.title }}</view>
            <view class="bottom data-v-cba160fe">
                <block v-if="isShowTags">
                    <block v-if="$root.g0">
                        <view class="tag data-v-cba160fe" v-for="(tag, index) in info.tags" :key="index">{{ tag }}</view>
                    </block>
                    <view class="tag data-v-cba160fe" v-else>人气新品</view>
                </block>
                <view class="price data-v-cba160fe">
                    <price-display @__l="__l" class="data-v-cba160fe" :info="info" vueId="30d1abbc-1"></price-display>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
import priceDisplay from '@/components/PriceDisplay/PriceDisplay';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['components/ProductItem/ProductItem'],
    {
        '2abb': function (t, n, e) {
            'use strict';

            var o = e('a67d');
            e.n(o).a;
        },
        '9c3e': function (t, n, e) {
            'use strict';

            e.r(n);
            var o = e('b4bd');
            var u = e('e633');
            for (var i in u) {
                if (['default'].indexOf(i) < 0) {
                    (function (t) {
                        e.d(n, t, function () {
                            return u[t];
                        });
                    })(i);
                }
            }
            e('2abb');
            var c = e('f0c5');
            var r = Object(c.a)(u.default, o.b, o.c, false, null, 'cba160fe', null, false, o.a, void 0);
            n.default = r.exports;
        },
        a67d: function (t, n, e) {},
        b4bd: function (t, n, e) {
            'use strict';

            e.d(n, 'b', function () {
                return u;
            });
            e.d(n, 'c', function () {
                return i;
            });
            e.d(n, 'a', function () {
                return o;
            });
            var o = {
                PriceDisplay: function () {
                    return e.e('components/PriceDisplay/PriceDisplay').then(e.bind(null, '6b05'));
                }
            };
            var u = function () {
                this.$createElement;
                var t = (this._self._c, this.isShowTags ? this.info.tags && this.info.tags.length : null);
                this.setData(
                    Object.assign(
                        {},
                        {
                            $root: {
                                g0: t
                            }
                        }
                    )
                );
            };
            var i = [];
        },
        d795: function (t, n, e) {
            'use strict';

            (function (t) {
                Object.defineProperty(n, '__esModule', {
                    value: true
                });
                n.default = void 0;
                var e = {
                    props: {
                        grid: {
                            type: String,
                            default: function () {
                                return 'grid2';
                            }
                        },
                        info: {
                            type: Object,
                            default: function () {
                                return {};
                            }
                        },
                        tag: {
                            type: String
                        },
                        theme: {
                            type: String,
                            default: function () {
                                return 'default-theme';
                            }
                        },
                        isShowTags: {
                            type: Boolean,
                            default: function () {
                                return true;
                            }
                        }
                    },
                    data: function () {
                        return {};
                    },
                    computed: {
                        tagString: function () {
                            return (this.info && this.info.tags && this.info.tags[0]) || ' ';
                        }
                    },
                    methods: {
                        toDetail: function () {
                            t.navigateTo({
                                url: '/pages/productDetail/index?uuid=' + this.info.uuid
                            });
                        }
                    }
                };
                n.default = e;
            }.call(this, e('543d').default));
        },
        e633: function (t, n, e) {
            'use strict';

            e.r(n);
            var o = e('d795');
            var u = e.n(o);
            for (var i in o) {
                if (['default'].indexOf(i) < 0) {
                    (function (t) {
                        e.d(n, t, function () {
                            return o[t];
                        });
                    })(i);
                }
            }
            n.default = u.a;
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'components/ProductItem/ProductItem-create-component',
    {
        'components/ProductItem/ProductItem-create-component': function (t, n, e) {
            e('543d').createComponent(e('9c3e'));
        }
    },
    [['components/ProductItem/ProductItem-create-component']]
]);
</script>
<style>
@import './ProductItem.css';
</style>
